home *** CD-ROM | disk | FTP | other *** search
/ Quarterdeck InternetSuite / Quarterdeck InternetSuite.iso / qsockpro.qip / NWRAINET.MPS < prev    next >
Encoding:
Text File  |  1996-03-20  |  1.5 KB  |  65 lines

  1. # NWRAINet, Inc. PPP script
  2. # note:  this script is also written to handle SLIP
  3. #        in case this provider ever supports it.  At
  4. #        the moment, it appears to be a PPP-only provider.
  5. # Copyright 1995 Quarterdeck Corporation
  6. # 5-9-95
  7.  
  8. STRING username
  9. STRING password
  10. STRING framing
  11. STRING IPAddress
  12.  
  13. SetTimeOut 90
  14.  
  15. CfgGetValue "Username" username
  16. IF result = 0 THEN
  17.     GetInput "Enter your username:" username
  18.     IF result = 0 THEN
  19.         PRINT "Warning, no username entered."
  20.     ELSE
  21.         PRINT "Username set to: ";username
  22.     ENDIF
  23. ENDIF
  24.  
  25. CfgGetValue "Password" password
  26. IF result = 0 THEN
  27.     GetPassword "Enter your password:" password
  28.     IF result = 0 THEN
  29.         PRINT "Warning, no password entered."
  30.     ELSE
  31.         PRINT "Password set."
  32.     ENDIF
  33. ENDIF
  34.  
  35. CfgGetValue "Framing" framing
  36. IF result = 0 THEN
  37.     ABORT "Can't read 'Framing' setting from QDECK.INI."
  38. ENDIF                           # don't wait for spaces
  39.  
  40. CommWaitFor "login:"            # not case sensitive
  41.     CommSend username
  42. IF framing = "MPPPP" THEN
  43.     CommSend "P"                # ask for PPP
  44. #ELSE
  45. #    CommSend "S"                # otherwise ask for SLIP
  46. ENDIF
  47.  
  48. CommSend "%r"
  49.  
  50. CommWaitFor "password:"
  51.     CommSend password
  52.     CommSend "%r"
  53.  
  54. IF framing = "MPSLIP" THEN
  55.     CommWaitFor "to"
  56.     CommReadIPAddr IPAddress
  57.     IF result < 7 THEN              # IP Address length test
  58.         ABORT "%rMissing or invalid IP Address."
  59.     ENDIF
  60.     CfgSetValue "IPAddress" ipaddress
  61.     PRINT "%rIP Address set to:"; ipaddress
  62. ENDIF
  63.  
  64. END
  65.